import * as React from 'react';
import {Text} from 'react-native';
import theme from '../../util/theme';

export default function BText(props) {
  const style = {
    color: '#333',
    lineHeight: 20,
    fontSize: 12,
    fontWeight: '400',
    ...props.style,
  }
  if (props.type === 'gray') {
    style.color = '#999'
  }
  if (props.type === 'info') {
    style.color = '#72ace8'
  }
  if (props.type === 'second') {
    style.color = theme.secondColor
  }

  return (
    <Text {...props} style={style}>{props.children}</Text>
  );
}